package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ASUS
 * Date: 2023-11-13
 * Time: 16:49
 */
class Base{
    public int a = 8;
    public int b;
    public void methodB(){
        System.out.println("methodB");
    }
}
class Derived extends Base{
    public int a = 199;
    public void methodD(){
        System.out.println(a);
        System.out.println(super.a);
        System.out.println(b);
        System.out.println("methodD");
    }

    public void methodB(char ch){
        System.out.println("methodB-char ch");
    }
    public void test() {

        methodB();
        methodB('c');
    }
}

public class Test2 {
    public static void main(String[] args) {
        Derived derived = new Derived();
        derived.test();
    }
}
